This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
RE: Call an agent from an agent ~Lily Nonwetherjip 15.Jan.04 03:36 PM a Web browser Applications Development 6.0.3Windows XP
If you must - you can do it like this (u should really bite the bullet and combine the two agents - it's less hassle than you think!):
Declarations:
Dim db As NotesDatabase
Dim agent As NotesAgent
Dim agentNameG As String
Dim kwdSuccess As String
Dim AgError As String
Dim sAgentProcess As String
Dim docsProcessed As Integer
Sub Initialise
Dim s As New NotesSession
Set db = s.CurrentDatabase
Dim agentLog As New NotesLog("Agent log")
Call agentLog.OpenAgentLog
On Error Goto processError
Call Main
Exit Sub
ProcessError:
Call agentLog.LogAction("Error:"+ Str(Err)& Error$)
Exit Sub
End Sub
Sub Main
Call agentNameRun("agCustNHold")
If agent.RunOnServer = 0 Then
Call agentNameRun("agCustHold")
end if
End Sub
Function agentNameRun(agentName As String) As String
agentNameG = agentName
Set agent = db.GetAgent(agentName)
End Function